Skip to content

test: provide an opaque-values testing mode #83622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kavon
Copy link
Member

@kavon kavon commented Aug 8, 2025

Introduces a new build-script flag --test-optimize-none-with-opaque-values
and build targets like check-swift-optimize_none_with_opaque_values that
runs the execution_test's while compiling them with -enable-sil-opaque-values.

This mode is quite useful while working to bring-up opaque values. Tests that are known to have issues have been marked with // XFAIL: swift_test_mode_optimize_none_with_opaque_values until they can be addressed. The expectation is that this is a one-time mass marking and no new code changes will regress the existing functionality.

@kavon
Copy link
Member Author

kavon commented Aug 8, 2025

@swift-ci smoke test

@kavon
Copy link
Member Author

kavon commented Aug 8, 2025

@swift-ci test

@kavon kavon force-pushed the kavon/test-opaque-values branch from f84e70b to d258ac8 Compare August 11, 2025 21:18
@kavon
Copy link
Member Author

kavon commented Aug 11, 2025

@swift-ci smoke test

kavon added 5 commits August 11, 2025 15:45
The @line directive in FileCheck supports arithmetic,
so this is an NFC to make the test less fragile.
This test fused both the CHECK directives and the
source code into one file, and is sensitive to the line numbers
that source code appears on in that file. Thus, any attempts to
add new lines to this test would break it.

This refactoring moves the source code to a separate file so
its line numbers stay stable.
Introduces a new build-script flag `--test-optimize-none-with-opaque-values`
and build targets like `check-swift-optimize_none_with_opaque_values` that
runs the execution_test's while compiling them with -enable-sil-opaque-values.

This mode is quite useful while working to bring-up opaque values.
This will only kick-in during a full test (validation test)
@kavon kavon force-pushed the kavon/test-opaque-values branch from d258ac8 to 8078152 Compare August 11, 2025 22:48
@kavon
Copy link
Member Author

kavon commented Aug 11, 2025

@swift-ci smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant